<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('薪资明细')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-cost-edit" th:object="${hrCost}">
        <input name="id" th:field="*{id}" type="hidden"><!--修改时传的主键-->
        <div class="form-group">
            <label class="col-sm-3 control-label">一级部门：</label>
            <div class="col-sm-8">
                <!--<select  name="dept" id="dept" class="form-control">-->
                    <!--<option>一级部门（选填）</option>-->
                    <!--<option th:each="pro:${deptinfos}" th:value="${pro.id}" th:field="*{dept}"-->
                            <!--th:text="${pro.dept}"></option>-->
                <!--</select>-->
                <input id="dept" name="dept" class="form-control" type="text" th:field="*{dept}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">月份：</label>
            <div class="col-sm-8">
                <select  name="month" id="month" class="form-control" >
                    <option>月份（选填）</option>
                    <option th:each="pro:${monthinfos}" th:value="${pro.id}" th:field="*{month}"
                            th:text="${pro.month}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">人数：</label>
            <div class="col-sm-8">
                <input id="number" name="number" class="form-control" type="text" th:field="*{number}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">工资：</label>
            <div class="col-sm-8">
                <input id="wages" name="wages" class="form-control" type="text" th:field="*{wages}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">油补：</label>
            <div class="col-sm-8">
                <input id="oilPatch" name="oilPatch" class="form-control" type="text" th:field="*{oilPatch}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">社保：</label>
            <div class="col-sm-8">
                <input id="socialSecurity" name="socialSecurity" class="form-control" type="text" th:field="*{socialSecurity}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">公积金：</label>
            <div class="col-sm-8">
                <input id="accumulationFund" name="accumulationFund" class="form-control" type="text" th:field="*{accumulationFund}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">费用合计：</label>
            <div class="col-sm-8">
                <input id="totalCost" name="totalCost" class="form-control" type="text" th:field="*{totalCost}">
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
    var prefix = ctx + "cost";
    $("#form-cost-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-cost-edit').serialize());
        }
    }


    // $("input[name='dateEntry']").datetimepicker({
    //     format: "yyyy-mm-dd",
    //     minView: "month",
    //     autoclose: true
    // });

</script>
</body>
</html>